package org.dromara.system.domain.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.system.domain.SimMallCommodity;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * 商城商品视图对象 sim_mall_commodity
 *
 * @author Lion Li
 * @date 2025-08-15
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = SimMallCommodity.class)
public class SimMallCommodityVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @ExcelProperty(value = "")
    private Long id;

    /**
     *
     */
    @ExcelProperty(value = "")
    private Long userId;

    @NotNull(message = "商城名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long mallNameId;


    @NotNull(message = "分类不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long mallClassificationId;

    /**
     * 商品名称
     */
    @ExcelProperty(value = "商品名称")
    private String commodityTitle;

    /**
     * 商品logo
     */
    @ExcelProperty(value = "商品logo")
    private String commodityLogo;


    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "commodityLogo")
    private String commodityLogoUrl;

    /**
     * 商品图片 以 | 做分割符号
     */
    @ExcelProperty(value = "商品图片")
    private String commodityImages;


    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "commodityImages")
    private String commodityImagesUrl;

    /**
     * 折扣价
     */
    @ExcelProperty(value = "折扣价")
    private BigDecimal commodityPrice;

    /**
     * 商品描述
     */
    @ExcelProperty(value = "商品描述")
    private String commodityDescription;

    /**
     * 库存
     */
    @ExcelProperty(value = "库存")
    private Integer commodityStock;

    /**
     * 排序
     */
    @ExcelProperty(value = "排序")
    private Integer commoditySort;

    /**
     * 状态(0:禁用,1:启用)
     */
    @ExcelProperty(value = "状态(0:禁用,1:启用)")
    private Integer commodityStatus;

    //是否参与升级
    private Integer isAllowUpgrade;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;


    @ExcelProperty(value = "商城名称")
    private String mallName;

    @ExcelProperty(value = "商城分类名称")
    private String classificationName;

    private Date createTime;

}
